<p:dialog xmlns="http://www.w3.org/1999/xhtml"
      	  xmlns:h="http://java.sun.com/jsf/html"
      	  xmlns:f="http://java.sun.com/jsf/core"
      	  xmlns:ui="http://java.sun.com/jsf/facelets"
      	  xmlns:p="http://primefaces.org/ui"
      	  modal="false"  resizable="true" 
		  widgetVar="dialogConsultarFormaPagamento" id="idDialogConsultarFormaPagamento" closable="true"
		  appendToBody="true"> 	
  	
<h:form id="formDialogConsultarFormaPagamento" >
<h:panelGroup id="pgDialogConsultarFormaPagamento">

 	<p:growl id="growlFormaPagamento" showDetail="true"/> 
    	<h:panelGrid columns="2" style="text-align:center; margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Código" style="font-size:14px; float:left; padding-right:20px "/>  
            <h:outputLabel value="FormaPagamento" style="font-size:14px; float:left"/> 
            
            <p:inputText value="#{formaPagamentoBean.formaPagamento.idFormaPagamento}" style="width:100px; heigth:15px; font-size:14px; padding-right:20px"/>  
  			<p:inputText value="#{formaPagamentoBean.formaPagamento.descricao}" style="width:200px; heigth:15px; font-size:14px;"/>  
        </h:panelGrid>  

    <p:commandButton value="Consultar" actionListener="#{formaPagamentoBean.findFormaPagamento}" style="margin-right:20px; margin-left:10px;" /> 
	<p:commandButton value="Novo"  process="@this pgDialogConsultarFormaPagamento" style="margin-right:20px;" /> 
	<p:commandButton value="Limpar"   style="margin-right:20px;" />
    		
    <p:dataTable id="dataTableFormaPagamento" var="formaPagamento" value="#{condicaoPagamentoBean.findFormaPagamento()}"  
    			 rowKey="#{formaPagamento.idFormaPagamento}"  selectionMode="single"
                 paginator="true" rows="10"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="5,10,15" style="padding-top:20px;">  
        <f:facet name="header">Lista de FormaPagamentos</f:facet>    
		<p:column>  
            <f:facet name="header">  
                <h:outputText value="Código da FormaPagamento" />  
            </f:facet>  
            <h:outputText value="#{formaPagamento.idFormaPagamento}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Nome do FormaPagamento" />  
            </f:facet>  
            <h:outputText value="#{formaPagamento.descricao}" />  
        </p:column>  
        
        <p:column style="width:4%">  
        	<f:facet name="header">
        	 <h:outputText value="Selecionar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar" actionListener="#{condicaoPagamentoBean.selectFormaPagamento}" process="@this"  icon="ui-icon-search" title="Detail" />
        </p:column> 
        
        <p:column style="width:4%">  
         	<p:commandButton id="selectButtonDelete"  icon="ui-icon-trash" title="Delete" />
        </p:column>
    </p:dataTable>   

 </h:panelGroup>
 </h:form>
</p:dialog>
